﻿@model IEnumerable<AuctionDataLayer.User>

@{
    ViewBag.Title = "Action Users";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>Action Users</h2>

<p>
    @Html.ActionLink("Add user from RU", "AddRUUser")
</p>
<p>Total online users: @Model.Count()</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Username
        </th>
        <th>
            Email
        </th>
        <th>
            Department
        </th>
        <th>
            Study
        </th>
        <th>
            Balance
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Username)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Department)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Study)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Balance)
        </td>
        <td>
            @Html.ActionLink("Edit Balance", "EditUserBalance", new { id=item.Id })
            @*@Html.ActionLink("Details", "Details", new { id=item.Id }) |*@
        </td>
    </tr>
}

</table>
